import {Component, OnInit} from '@angular/core';
import {NavController, ToastController} from '@ionic/angular';
import {BasePage} from '../../common/basePage';
import {HttpService} from '../../services/http.service';
import {UrlAndOPT} from '../../common/url-and-opt.enum';

@Component({
  selector: 'app-user-account-unbind',
  templateUrl: './user-account-unbind.page.html',
  styleUrls: ['./user-account-unbind.page.scss'],
})
export class UserAccountUnbindPage extends BasePage implements OnInit {

  // 存管信息
  accountInfo: any = {};

  constructor(public navCtrl: NavController,
              public toastCtrl: ToastController,
              private service$: HttpService
  ) {
    super(navCtrl, toastCtrl);
  }

  ngOnInit() {
    this.getData();
  }

  // 获取存管账户数据
  getData() {
    this.service$.doRequest(UrlAndOPT.auth_user_account)
      .subscribe(obj => {
        if (obj) {
          this.accountInfo = obj['obj'];
        }
      });
  }

}
